package com.shaoyu.spring.study.runner;

import java.util.concurrent.Callable;

/**
 * @Desc : 线程异步调用的包装类,可用于skywalking的组件支持
 * @Author: shaoyu
 * @Date : 2022/7/11 10:45
 */
public interface ConcurrentWarp {

    /**
     * 包装异步调用的Callable
     * @param callable
     * @param <V>
     * @return
     */
    <V> Callable<V> warp(Callable<V> callable);

    /**
     * 包装异步调用的Runnable
     * @param runnable
     * @return
     */
    Runnable warp(Runnable runnable);
}
